<template>
    <div>
        <select name="" id="" v-model="type">
            <option :value="1" selected>APP订票</option>
            <option :value="0">前台兑换</option>
        </select>
        <ul>
            <li v-for="data in store.getters['CinemaModule/filterCinemaList'](type)" :key="data.cinemaId">
                {{ data.name }}
            </li>
        </ul>
    </div>
</template>
<script setup>
import { onMounted, ref } from 'vue'
import { mapMutations, mapState, mapActions, mapGetters } from 'vuex'
import { useStore } from 'vuex'
const store = useStore()

const type = ref(1)
onMounted(() => {
    // console.log(store.getters);
    if (store.state.CinemaModule.cinemaList.length === 0) {
        // 请求数据 dispatch
        store.dispatch('CinemaModule/getCinemaList',"参数演示");
        // this.getCinemaList('参数演示')
    } else {
        console.log('缓存');
    }
})
</script>


<style scoped lang="scss">
li {
    padding: 10px;
}
</style>